<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>医疗管理系统</title>
    
	<link href="css/Login.css" rel="stylesheet" type="text/css"/>
	<script type="text/javascript" src="js/new_file.js" charset="utf-8"></script>
		<script type="text/javascript">
		<% String pwd = (String)session.getAttribute("pwd");
		   if(pwd !=null){
		%>
			alert("密码修改成功");
		<%} HttpSession hs = request.getSession();
				hs.removeAttribute("pwd");%>
		$(function(){
			$("form").submit(function(){
				var ips = $("select[name='type']").val();
				if(ips == "1"){//店长
					$("form").attr("action","sos");
				}else if(ips == "2"){//店员
					$("form").attr("action","cs");
				}else if(ips == "3"){//采购人员
					$("form").attr("action","pps");
				}else if(ips == ""){
					return false;
				}
			});
		});
	</script>
  </head>
  
  <body>
  	
	<div class="topper">
	        <img src="img/loginsj.png" ><span>欢迎进入医疗管理信息系统</span>
	    	<ul >
	    		<li><a href="Login.jsp">帮助</a></li>
	    		<li><a href="Login.jsp">关于</a></li>
	    	</ul>
	</div>
	<div class="mainner"> 	
    	<div class="loginbox">
    		<form action="#" method="post">
    		   <input type="hidden" name="oper" value="login"/>
			   <ul>
				   <li><input name="name" type="text" class="loginuser" placeholder="用户名" /></li>
				   <li><input name="pwd" type="password" class="loginpwd" placeholder="密码"  /></li>
				   <li>
				   	    <div class="logintype">
				   	 		  身份:&nbsp;&nbsp;
				   	 		  <select name="type">
								<option value ="" selected="selected">--请选择--</option>
								<option value ="1">店长</option>
								<option value ="2">店员</option>
								<option value ="3">采购人员</option>
			      			  </select>
				   	    </div>
				   </li>
				   <li>
				   	<input type="submit" class="loginbtn" value="登录"/>
				   </li>
			   </ul>
    		</form>
    		
    		<div class="check">
    			<c:if test="${requestScope.str!=null }">
    				<span>用户名或密码错误</span>
    			</c:if>
    		</div>
    	</div>
    </div>
     <div class="footer">
    	欢迎访问<a href="http://www.baidu.com">www.baidu.com</a>
    </div>
  </body>
</html>
